package com.app.library.utils

import android.content.Context
import android.view.Gravity
import com.app.library.R
import com.hjq.toast.ToastParams
import com.hjq.toast.Toaster
import com.hjq.toast.style.BlackToastStyle
import com.hjq.toast.style.CustomToastStyle

class ToasterUtils {
    companion object {
        fun showShort(content: String?) {
            val params = ToastParams()
            params.text = content
            params.style = CustomToastStyle(R.layout.layout_custom_toast,Gravity.TOP)
            Toaster.show(params)
        }
        fun showShort(context: Context, contentId: Int) {
            val params = ToastParams()
            params.text = context.getText(contentId)
            params.style = CustomToastStyle(R.layout.layout_custom_toast,Gravity.TOP)
            Toaster.show(params)
        }

        fun showLong(content: String) {
            val params = ToastParams()
            params.text = content
            params.style = CustomToastStyle(R.layout.layout_custom_toast,Gravity.TOP)
            Toaster.show(params)
        }
    }

}